package com.taxt.http.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.taxt.http.api.HomeDataApi;

import java.util.List;

/**
 * author:         wq
 *
 * @CreateDate: 2021/12/14 15:54
 * @Description: 首页
 */
public class HomeInfoBean implements Parcelable{
    private String pageId;
    private String taxYear;
    private String hotImageAddress;
    private String hotImageTitleFlag;
    private String isShowIcon001Flag;

    public String getIsShowIcon001Flag() {
        return isShowIcon001Flag;
    }

    public void setIsShowIcon001Flag(String isShowIcon001Flag) {
        this.isShowIcon001Flag = isShowIcon001Flag;
    }

    public String getHotImageTitleFlag() {
        return hotImageTitleFlag;
    }

    public void setHotImageTitleFlag(String hotImageTitleFlag) {
        this.hotImageTitleFlag = hotImageTitleFlag;
    }

    private List<String> messageTitle;
    private List<String> bannerUrlAddress;
    private List<String> hotProblem;
    private List<CommonBusinessDTO> commonBusiness;


    protected HomeInfoBean(Parcel in) {
        pageId = in.readString();
        taxYear = in.readString();
        hotImageAddress = in.readString();
        messageTitle = in.createStringArrayList();
        bannerUrlAddress = in.createStringArrayList();
        hotProblem = in.createStringArrayList();
        commonBusiness = in.createTypedArrayList(CommonBusinessDTO.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(pageId);
        dest.writeString(taxYear);
        dest.writeString(hotImageAddress);
        dest.writeStringList(messageTitle);
        dest.writeStringList(bannerUrlAddress);
        dest.writeStringList(hotProblem);
        dest.writeTypedList(commonBusiness);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<HomeInfoBean> CREATOR = new Creator<HomeInfoBean>() {
        @Override
        public HomeInfoBean createFromParcel(Parcel in) {
            return new HomeInfoBean(in);
        }

        @Override
        public HomeInfoBean[] newArray(int size) {
            return new HomeInfoBean[size];
        }
    };

    public String getPageId() {
        return pageId;
    }

    public void setPageId(String pageId) {
        this.pageId = pageId;
    }

    public String getTaxYear() {
        return taxYear;
    }

    public void setTaxYear(String taxYear) {
        this.taxYear = taxYear;
    }

    public String getHotImageAddress() {
        return hotImageAddress;
    }

    public void setHotImageAddress(String hotImageAddress) {
        this.hotImageAddress = hotImageAddress;
    }

    public List<String> getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(List<String> messageTitle) {
        this.messageTitle = messageTitle;
    }

    public List<String> getBannerUrlAddress() {
        return bannerUrlAddress;
    }

    public void setBannerUrlAddress(List<String> bannerUrlAddress) {
        this.bannerUrlAddress = bannerUrlAddress;
    }

    public List<String> getHotProblem() {
        return hotProblem;
    }

    public void setHotProblem(List<String> hotProblem) {
        this.hotProblem = hotProblem;
    }

    public List<CommonBusinessDTO> getCommonBusiness() {
        return commonBusiness;
    }

    public void setCommonBusiness(List<CommonBusinessDTO> commonBusiness) {
        this.commonBusiness = commonBusiness;
    }

    public static class CommonBusinessDTO implements Parcelable{
        private String subTitle;
        private String title;

        protected CommonBusinessDTO(Parcel in) {
            subTitle = in.readString();
            title = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(subTitle);
            dest.writeString(title);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<CommonBusinessDTO> CREATOR = new Creator<CommonBusinessDTO>() {
            @Override
            public CommonBusinessDTO createFromParcel(Parcel in) {
                return new CommonBusinessDTO(in);
            }

            @Override
            public CommonBusinessDTO[] newArray(int size) {
                return new CommonBusinessDTO[size];
            }
        };

        public String getSubTitle() {
            return subTitle;
        }

        public void setSubTitle(String subTitle) {
            this.subTitle = subTitle;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }
    }
}
